Skip to content

Make superimposed section collapsible like other tag group sections#72

Merged
Demonstrandum merged 3 commits into
masterfrom
cursor/collapsible-superimposed-section-b74a
May 28, 2026
Merged

Make superimposed section collapsible like other tag group sections#72
Demonstrandum merged 3 commits into
masterfrom
cursor/collapsible-superimposed-section-b74a

Conversation

@Demonstrandum

Copy link
Copy Markdown
Owner

Summary

The Superimposed section header on the time series tab was a non-interactive div, while every other section (Pinned, and all tag groups) has a clickable toolbar that collapses/expands the cards. This PR brings the Superimposed section up to the same standard.

Changes

State / store

  • Added superimposedSectionExpanded: boolean (default true) to MetricsNamespacedState
  • Added metricsSuperimposedSectionExpansionChanged action (no props — it's a pure toggle)
  • Added reducer case that flips superimposedSectionExpanded
  • Added getMetricsSuperimposedSectionExpanded selector
  • Updated buildBlankState() in testing.ts to include the new field

Persistence

Reuses the existing _tb_tag_group_expansion.v1 localStorage key. The superimposed section's state is stored as a ['__superimposed__', boolean] entry alongside the tag group entries. On load, the reducer filters out that reserved key before populating tagGroupExpanded, and reads it separately to set superimposedSectionExpanded. The persistTagGroupExpansion$ effect now triggers on metricsSuperimposedSectionExpansionChanged as well.

UI

  • Converted the div.group-toolbar in SuperimposedCardsViewComponent to a <button> that emits expansionToggled
  • Added expand_less_24px / expand_more_24px icon in a span.expand-group-icon (same pattern as CardGroupToolBarComponent)
  • The cards grid is wrapped in *ngIf="isExpanded"
  • SCSS updated to style the button correctly: border: 0, cursor: pointer, font: inherit, width: 100%, matching the existing card group toolbar style
  • SuperimposedCardsViewContainer wires isExpanded$ from the store and dispatches the action on toggle
Open in Web Open in Cursor 

- Add superimposedSectionExpanded field to MetricsNamespacedState (default true)
- Add metricsSuperimposedSectionExpansionChanged action
- Add reducer case to toggle the field
- Add getMetricsSuperimposedSectionExpanded selector
- Update SuperimposedCardsViewComponent: convert toolbar div to a clickable
  button with expand_less/expand_more icons; gate the cards grid on isExpanded
- Update SuperimposedCardsViewContainer to wire expansion state from store and
  dispatch the toggle action
- Update SCSS to style the toolbar as a button (border:0, cursor:pointer,
  font:inherit, width:100%) matching card_group_toolbar style
- Persist superimposed section expansion state in localStorage alongside tag
  group expansion using reserved key '__superimposed__' in the existing
  _tb_tag_group_expansion.v1 entry; restore it on load

Co-authored-by: Samuel <samuel@knutsen.co>
@github-actions

github-actions Bot commented Apr 2, 2026

Copy link
Copy Markdown

Preview Deployment

Status ✅ Running
Live Preview https://Demonstrandum-tensorbored-pr-72.hf.space
Space https://huggingface.co/spaces/Demonstrandum/tensorbored-pr-72
Details
  • Wheel: tensorbored_nightly-2.21.0a20260407-py3-none-any.whl
  • Commit: 2e417ab
  • Build status: success

cursoragent and others added 2 commits April 7, 2026 12:38
…rder:0

The border:0 shorthand was declared after the border-bottom mixin include,
wiping out the bottom border in the CSS cascade. When the section is collapsed
the toolbar blended into the next section's header with no visible divider.

Moving border:0 before the border-bottom include restores the 1px solid
bottom border that all other section toolbars have.

Co-authored-by: Samuel <samuel@knutsen.co>
@Demonstrandum Demonstrandum marked this pull request as ready for review May 28, 2026 11:10
@Demonstrandum Demonstrandum merged commit ff3f0f8 into master May 28, 2026
13 checks passed

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 217c88b. Configure here.

padding: 0 16px;
position: sticky;
top: 0;
width: 100%;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button overflows container due to missing box-sizing

Medium Severity

The .group-toolbar was converted from a <div> to a <button>, and width: 100% was added along with padding: 0 16px. There is no global box-sizing: border-box reset in this project (confirmed by searching the codebase and global styles). Under the default content-box model, width: 100% sets the content width to 100% of the parent, then padding adds 32px on top, causing the button to overflow its container horizontally. The original <div> didn't need explicit width because block elements auto-fill their container while accounting for padding. A box-sizing: border-box declaration is needed on this element.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 217c88b. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants